import {HTTP} from "@/utils/http.ts";
import {useState, useEffect} from "react";

const useHotProduct = () => {
    const [HotData, setData] = useState([])

    useEffect(() => {
        async function getHotProduct() {
            const res = await HTTP.get('/get_hot_item')
            setData(res.data)
        }

        getHotProduct()
    }, [])

    return {HotData}
}

export default useHotProduct